package com.hsd.commons.action;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.hsd.commons.helper.MenuHelper;
import com.hsd.core.base.action.BaseAction;

@Controller
@RequestMapping("/menu")
public class MenuAction extends BaseAction{
	@RequestMapping(value="/loadMenu.do")
	public String loadMenu(HttpServletRequest request,ModelMap model){
		String role = "public";
		String menuid = request.getParameter("menuid");
		
		model.put("menulist",  MenuHelper.loadMenu(menuid, role));
		model.put("menuname", MenuHelper.getMenuName(menuid));
		return "app/menu";
	}
}